home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / Arashi 1.1 Source / For your think c folder / Juri's Class Library / CNumberFormatter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-30  |  1.1 KB  |  45 lines  |  [TEXT/KAHL]

  1. /*/
  2.      Project Arashi: CNumberFormatter.h
  3.      Major release: Version 1.1, 7/22/92
  4.  
  5.      Last modification: Monday, November 30, 1992, 2:27
  6.      Created: Monday, November 30, 1992, 0:18
  7.  
  8.      Copyright © 1992, Juri Munkki
  9. /*/
  10.  
  11. #pragma once
  12. #include <CBaseObject.h>
  13.  
  14. #define    SUBFORMATLEN    16
  15.  
  16. class    CNumberFormatter : public CBaseObject
  17. {
  18. public:
  19.     char    formatString[SUBFORMATLEN];
  20.     
  21.     char    negativePrefix[SUBFORMATLEN];
  22.     char    negativePostfix[SUBFORMATLEN];
  23.     
  24.     char    positivePrefix[SUBFORMATLEN];
  25.     char    positivePostfix[SUBFORMATLEN];
  26.  
  27.     char    currencyPrefix[SUBFORMATLEN];
  28.     char    currencyPostfix[SUBFORMATLEN];
  29.  
  30.     char    thousandsSeparator[SUBFORMATLEN];
  31.     char    decimalSign[SUBFORMATLEN];
  32.     
  33.     short    integerPart;
  34.     short    minDecimals;
  35.     short    maxDecimals;
  36.     
  37.     void    INumberFormatter();
  38.     void    SetDecimals(short iPart, short min, short max);
  39.     void    SetFormatString(StringPtr format);
  40.     void    SetNegativeStrings(StringPtr pre, StringPtr post);
  41.     void    SetPositiveStrings(StringPtr pre, StringPtr post);
  42.     void    SetCurrencyStrings(StringPtr pre, StringPtr post);
  43.     void    SetSeparatorStrings(StringPtr thousands, StringPtr decimals);
  44.     void    FormatNumber(long double n, StringPtr dest);
  45. };